Repository navigation
fix(workspace): Bury Pane targets visible Dispatch row - #109
Merged
Merged
Conversation
requestBuryFocused was the last grid-only action surfaced by issue #94's audit. It read tab.focusedSessionId directly, so "Bury Pane" from Dispatch Mode buried whichever grid pane happened to be focused underneath the visible dispatch row instead of acting on the row the user could see. Resolves the target through commandTargetSessionIdForState — the same resolver every other "act on the visible thing" command already uses (close, copy-assistant, scroll-to-latest, switch-provider, reload, rewind, soft-reload-view). Also adds a WHY comment on buryFocused's `?? activeTab?.focusedSessionId` fallback to flag it as intentional defensive code rather than a load-bearing path — every real caller passes an explicit id, but the fallback exists so a future caller that forgets fails loudly instead of silently dispatching to the wrong session. After this commit, the action-layer half of #94 is closed: every "focused" action either routes through commandTargetSessionIdForState or is intentionally grid-only by design (split, navigate, resize, detach-from-grid, undo-close). Closes #94. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes the action-layer half of #94. `requestBuryFocused` was the last grid-only action surfaced by the audit — every other "focused" verb either routes through `commandTargetSessionIdForState` already (close, scroll-to-latest, switch-provider, reload, soft-reload, copy-assistant, tail-mode, rewind) or is intentionally grid-only by design (split, navigate, resize, detach-from-grid, undo-close).
Now `requestBuryFocused` uses the same Dispatch-aware resolver so "Bury Pane" acts on the highlighted Dispatch row instead of whatever grid pane is focused underneath.
What the bug looked like
Sites changed
`src/renderer/src/workspace/hook/actions/pane.ts`:
One file, 25 insertions / 5 deletions.
Audit trail
PR #107 closed the view-layer half of #94 (which sessions are in a tab). The action-layer audit done as part of this PR confirmed that the rest of `workspace/hook/actions/` — provider, helpers, session, reader, spotlight, dispatch, undoClose — is already either Dispatch-aware via `commandTargetSessionIdForState` or correctly grid-only by design. `requestBuryFocused` was the lone holdout.
Test plan
Closes
🤖 Generated with Claude Code